import {
  legacy_createStore as createStore, 
  applyMiddleware,
} from 'redux'
// 用于处理异步action的中间件
import thunk from 'redux-thunk'

import { composeWithDevTools } from '@redux-devtools/extension';

import allReducer from './reducers';

const store = createStore(
  allReducer, 
  composeWithDevTools(applyMiddleware(thunk)) // 配置redux-devtools扩展响应
)

export default store